from base import BaseHandler
import urllib
import logging

class RedirectHandler(BaseHandler):
	def get(self, url):
		s = ''
		for arg in self.request.arguments():
			val = self.request.get(arg)
			s += '%s=%s&' % (arg,val)
		if s != '':
			s = '?' + s
			
		logging.info(urllib.unquote(url) + s)
		self.redirect(urllib.unquote(url) + s)